#include<bits/stdc++.h>
using namespace std;

int main()
{
	freopen("candy.in","r",stdin);
	freopen("candy.out","w",stdout);
	int n,l,r,max=0,num;
	cin>>n>>l>>r;
	for(int i=l;i<=r;i++){
		i=i-n;
		i=num; 
		if(i<n){
			if(num>max){
				num=max;
			}	
		}
	}
	cout<<max;
	fclose(stdin);
	fclose(stdout);
	return 0;
} 
